package com.geekhome.player.global.exception;

/**
 * Copyright © 2018年 ziniuxiaozhu. All rights reserved.
 *
 * @Author 临江仙 hzqiuxm@163.com
 * 异常基础类
 * @Date 2018/8/30 20:23
 */

public class ZiniuException extends RuntimeException{
    protected int code;
    protected String msg;
    /**
     * 异常构造方法，必须有Code和msg
     * @param code 状态码
     * @param msg  错误信息
     */

    public ZiniuException(int code, String msg){
        super();
        this.code = code;
        this.msg = msg;
    }

    public int getCode(){
        return code;
    }

    public String getMsg(){
        return this.msg;
    }


    public ZiniuException(String message, int code, String msg) {
        super(message);
        this.code = code;
        this.msg = msg;
    }

    public ZiniuException(String message, Throwable cause, int code, String msg) {
        super(message, cause);
        this.code = code;
        this.msg = msg;
    }
}
